package com.le.tester.javaThink.fifth.chapter13_FuncProgramming;

import java.util.function.BiConsumer;

/**
 * 描述：方法转换
 */

class Int1 {
}

class Int2 {
}

public class MethodConversion {
    static void accept(Int1 i1, Int2 i2) {
        System.out.println("accept()");

    }

    static void someOtherName(Int1 i1, Int2 i2) {
        System.out.println("someOtherName()");
    }

    public static void main(String[] args) {
        BiConsumer<Int1, Int2> bic;
        bic = MethodConversion::accept;
        bic.accept(new Int1(), new Int2());

        bic = MethodConversion::someOtherName;
        bic.accept(new Int1(), new Int2());

    }
}
